package com.cwj.vm;

/**
 * @author: Chenwujie
 * @date: 2021-07-15 14:45
 */
public class SynchronizedTest {
    private static int i;
    public static void main(String[] args) {
        m();
        int i = m1();
        System.out.println(i);
    }
    public static void m(){
        synchronized (SynchronizedTest.class){
            i++;
        }
    }

    public static int m1(){
        return i;
    }
}
